<?php

namespace App\Http\Presenters;

use Laracasts\Presenter\Presenter;

class TopicPresenter extends Presenter
{

    public function tStatus()
    {
        switch ($this->status) {
            case 0:
                return '<span class="orange smaller-80"> 未开始</span>';
                break;
            case 1:
                return '<span class="green smaller-80"> 进行中</span>';
                break;
            case 2:
                return '<span class="grey smaller-80"> 已结束</span>';
                break;
            default:
                break;
        }
    }

    public function tType()
    {
        switch ($this->type) {
            case 2:
                return '<span class="red smaller-80">填空题</span>';
                break;
            case 1:
                return '<span class="green smaller-80">选择题</span>';
                break;
            default:
                break;
        }
    }

}
